import { request } from '../utils/axios.js'

// 游戏相关 API 接口
export const gameApi = {
  // 搜索游戏
  searchGames: (data) => request.post('/api/cpc/v1/game/search', data),

  // 获取游戏详情
  getGameDetail: (data) => request.post(`/api/cpc/v1/game/detail`, data),

  // 推荐游戏列表
  etRecommendedGames: (data) => request.post('/api/cpc/v1/game/recommend', data),

  // 启动游戏
  startGame: (data) => request.post('/api/cpc/v1/game/start', data),

  // 获取游戏分类
  getGameCategories: () => request.get('/api/cpc/v1/game/categories'),

  // 获取热门游戏标签
  getGameTags: () => request.get('/api/cpc/v1/game/tags'),

  // 获取热搜词列表
  getKeywordList: (data) => request.post('/api/cpc/v1/search-keyword/list', data),

  // 搜索游戏
  getSearchGames: (data) => request.post('/api/cpc/v1/game/search', data),

  // 获取热门推荐游戏列表
  getHotRecommendGames: (data) => request.post('/api/cpc/v1/game/hot-recommend', data),

  // 按分类查询游戏列表
  getGameListByCategory: (data) => request.post('/api/cpc/v1/game/list-by-category', data),
}

// 导出默认对象
export default gameApi